import time
import threading

class Test(object):

    def __init__(self):
        self.say = None

    def __say(self, a, b, c):
        print("你好呀", a, b, c)
        time.sleep(2)

    def __run(self):
        print("我在跑步")
        time.sleep(2)

    # 线程代码
    def thread(self):
        # 开启线程
        for i in range(5):
            say_thread_object = threading.Thread(target=self.__say, args=(10,), kwargs={"b": 2, "c": 3})
            say_thread_object.start()
            run_thread_object = threading.Thread(target=self.__run)
            run_thread_object.start()

        while len(threading.enumerate()) != 0:
            if len(threading.enumerate()) <= 1:
                print("所有任务执行完毕")
                break

if __name__ == "__main__":
    Test().thread()